using System;
using System.Collections.Generic;
using System.Text;

namespace Weazel.Microblaze.Simulator.Components.Microblaze
{
  class DecodeException : Exception
  {
    private uint address;
    private uint value;
    private string mnemonic;

    public DecodeException(uint address, uint value, string mnemonic)
    {
      this.address = address;
      this.value = value;
      this.mnemonic = mnemonic;
    }

    public override string Message
    {
      get
      {
        return string.Format("Unable to decode instruction {0} (0x{1:X}) at address 0x{2:X}", mnemonic, value, address);
      }
    }
  }
}
